/*
-----------------------------------------------------------------------------
This source file is part of Labor3D
(Labor 3D Graphics Engine)

Copyright (c) 2009-2020 Rock Mao
* creator : Rock Mao
* created : 2009-5-2   22:29
* filename: LaborIndexBuffer.h
-----------------------------------------------------------------------------
*/
#ifndef __LABORINDEXBUFFER_H__
#define __LABORINDEXBUFFER_H__
#include "../LaborCoreDef.h"
#include "LaborHardwareBuffer.h"
NAMESPACE_LABOR3D_BEGIN

class LABORCORE_API CLIndexBuffer : public CLHardwareBuffer
{
protected:
	eLIndexType mIndexType;
	size_t      mNumIndexes;
	size_t      mIndexSize;
public:
	CLIndexBuffer(eLIndexType idxType, size_t numIndexes, EHB_Usage usage,
		bool useSystemMemory, bool useShadowBuffer);
	~CLIndexBuffer();
	/// Get the type of indexes used in this buffer
	eLIndexType getType(void) const { return mIndexType; }
	/// Get the number of indexes in this buffer
	size_t getNumIndexes(void) const { return mNumIndexes; }
	/// Get the size in bytes of each index
	size_t getIndexSize(void) const { return mIndexSize; }
};
NAMESPACE_LABOR3D_END
#endif